package com.tao.springcloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @InterfaceName OrderHystrixService
 * @Author HETAO
 * @Date 2020/5/10 17:29
 */
@Component
@FeignClient(value = "CLOUD-CONSUMER-HYSTRIX-PROVIDER",fallback = OrderFallbackService.class)
public interface OrderHystrixService {

    @GetMapping("hystrix/pyment/ok")
    public String paymentInfoOK(@RequestParam("id") Integer id) ;

    @GetMapping("hystrix/pyment/timeout/{id}")
    public String paymentInfoTimeOut(@PathVariable("id") Integer id) ;
}
